Determining onsets and offsets of cardiac depolarization and repolarization waves

ABSTRACT

In one example, a method includes determining a slope of a cardiac electrogram. The method may also include determining a threshold value based on a maximum of the slope of the cardiac electrogram. The method may further include identifying a last point of the cardiac electrogram before the slope of the cardiac electrogram crosses the threshold as one of an onset or an offset of a wave. In another example, the method further includes receiving an indication of local ventricular motion associated with a cardiac contraction, and determining an electromechanical delay between the identified onset and the local ventricular motion. Some examples include providing the electromechanical delay for configuration of cardiac resynchronization therapy.

TECHNICAL FIELD

The invention relates to medical devices, and more particular, tomedical devices for sensing, detection, and analysis of cardiacelectrograms and electrocardiograms.

BACKGROUND

Implantable medical devices (IMDs), such as implantable pacemakers,cardioverters, defibrillators, or pacemaker-cardioverter-defibrillators,provide therapeutic electrical stimulation to the heart. IMDs mayprovide pacing to address bradycardia, or pacing or shocks in order toterminate tachyarrhythmia, such as tachycardia or fibrillation. In somecases, the medical device may sense intrinsic depolarizations of theheart, detect arrhythmia based on the intrinsic depolarizations (orabsence thereof), and control delivery of electrical stimulation to theheart if arrhythmia is detected based on the intrinsic depolarizations.

IMDs may also provide cardiac resynchronization therapy (CRT), which isa form of pacing. CRT involves the delivery of pacing to the leftventricle, or both the left and right ventricles. The timing andlocation of the delivery of pacing pulses to the ventricle(s) may beselected to improve the coordination and efficiency of ventricularcontraction.

IMDs sense signals and deliver therapeutic stimulation via electrodes.Implantable pacemakers, cardioverters, defibrillators, orpacemaker-cardioverter-defibrillators are typically coupled to one ormore subcutaneous electrodes or intracardiac leads that carry electrodesfor cardiac sensing and delivery of therapeutic stimulation. The signalssensed via the electrodes may be referred to as a cardiac electrogram(EGM) and may include the depolarizations, repolarizations, and otherintrinsic electrical activity of the heart.

Systems for implanting medical devices may include workstations or otherequipment in addition to the medical device itself. In some cases, theseother pieces of equipment assist the physician or other technician withplacing the intracardiac leads at particular locations on the heart. Insome cases, the equipment provides information to the physician aboutthe electrical activity of the heart and the location of theintracardiac lead. The equipment may perform similar functions as themedical device, including delivering electrical stimulation to the heartand sensing the depolarizations of the heart. In some cases, theequipment may include equipment for obtaining an electrocardiogram (ECG)via electrodes on the surface of the patient.

SUMMARY

In general, the disclosure describes techniques for determining when anelectrical wave within a cardiac electrogram begins or ends. Moreparticularly, the techniques for detecting the onsets and offsets ofheart depolarization waves, such as the QRS complex and P-wave, andheart repolarization waves, such as the T-wave, are described. A varietyof diagnostic metrics may be determined based on the determined onsetsand/or offsets. As examples, QRS width, Q-T interval, orelectromechanical delay, e.g., of ventricular contraction relative tothe onset of the Q-wave, may be determined based on the determinedonsets and/or offsets.

In some examples, the diagnostic metrics may be used to optimize orotherwise guide the configuration of therapy, such as CRT. For CRT, leadplacement, pacing electrode configuration, or various atrio-ventricularor interventricular intervals may be configured based on metrics thatare determined based on the identified onsets and/or offsets. In someexamples, electromechanical delay may be used to configure CRT and,particularly, to select a lead placement, e.g. left-ventricular leadplacement, during implantation of a CRT system.

In one example, a method includes determining a slope of a cardiacelectrogram, determining a threshold value based on a maximum of theslope of the cardiac electrogram, and identifying a last point of thecardiac electrogram before the slope of the cardiac electrogram crossesthe threshold as one of an onset or an offset of a wave.

In another example, a system includes a slope module that determines theslope of a cardiac electrogram and a wave detector module thatdetermines a threshold value based on a maximum of the slope of thecardiac electrogram and identifies a last point of the cardiacelectrogram before the slope of the cardiac electrogram crosses thethreshold as one of an onset or and offset of a wave.

In another example, a system comprises means for determining a slope ofa cardiac electrogram, means for determining a threshold value based onthe maximum of the slope of the cardiac electrogram, and means foridentifying a last point of the cardiac electrogram before the slope ofthe cardiac electrogram crosses the threshold as one of an onset or anoffset of a wave.

In another example, a computer readable medium stores a set ofinstructions which, when implemented in a medical device system causesthe system to determine a slope of a cardiac electrogram, determine athreshold value based on the maximum of the slope of the cardiacelectrogram, and identify a last point of the cardiac electrogram beforethe slope of the cardiac electrogram crosses the threshold as one of anonset or an offset of a wave.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating and example system that maydetermine the onsets and offsets of various heart repolarization anddepolarization waves.

FIG. 2 is a block diagram illustrating an example configuration of awave detection module.

FIG. 3A is a flow diagram illustrating an example technique fordetermining the onset of a wave.

FIG. 3B is a flow diagram illustrating an example technique fordetermining the offset of a wave.

FIG. 4A is a flow diagram illustrating an example technique fordetermining the onset of a wave.

FIG. 4B is a flow diagram illustrating an example technique fordetermining the offset of a wave.

FIG. 5 is a graph illustrating an example cardiac electrogram.

FIG. 6 is a graph illustrating an example cardiac electrogram includingR-wave marker information.

FIG. 7 is a graph illustrating an example cardiac electrogram includingR-wave marker information and example windows around each marker.

FIG. 8 is a graph illustrating an example cardiac electrogram includingexample determined wave onset points.

FIG. 9 is a graph illustrating both a cardiac contraction curve and asurface ECG curve with indicators marking the determined onset ofdepolarization of the heart and the detected timing of local heartmechanical contraction.

FIG. 10 is a graph illustrating both a cardiac contraction curve at apotential intracardiac lead implant site and a local EGM curve from thesame potential implant site with indicators marking the determined onsetof local depolarization of the heart and the detected timing of localheart mechanical contraction.

FIG. 11 is a flow diagram illustrating an example technique forselecting intracardiac lead implant sites.

FIG. 12 is a flow diagram illustrating an example technique forselecting intracardiac lead implant site.

FIG. 13 is a conceptual diagram illustrating an example system thatdetermines the onset and offsets of heart depolarization andrepolarization waves.

FIG. 14 is a conceptual diagram illustrating the implantable medicaldevice (IMD) and leads of the system shown in FIG. 13 in greater detail.

FIG. 15 is a block diagram of an example implantable medical device thatmay determine the onset and offset of heart depolarization andrepolarization waves.

FIG. 16 illustrates an example of the time-delay between the delivery ofpacing and the onset of depolarization.

DETAILED DESCRIPTION

The techniques described in this disclosure allow a system to determinethe onsets and offsets of heart repolarization and depolarization waves.A variety of diagnostic metrics may be determined based on thedetermined onsets and/or offsets. As examples, QRS width, Q-T interval,or electromechanical delay, e.g., of ventricular contraction relative tothe onset of the Q-wave, may be determined based on the determinedonsets and/or offsets. In some examples, the diagnostic metrics may beused to optimize or otherwise guide the configuration of therapy, suchas CRT. For CRT, lead placement, pacing electrode configuration, orvarious atrio-ventricular or interventricular intervals may beconfigured based on metrics that are determined based on the identifiedonsets and/or offsets. In some examples, electromechanical delay may beused to configure CRT and, particularly, to select a lead placement,e.g. left-ventricular lead placement, during implantation of a CRTsystem

In general, a heart produces a repetitive electrical signal which causesthe heart to mechanically contract, thereby pumping blood throughout thebody. Generally, the signal may be detected and displayed as a cardiacelectrogram signal. Although the exact representation may differdepending on the placement of leads on or within the body to detect theheart signal, among other factors, a common cardiac electrogram includesseveral recognizable features. The initial deflections of the signalrepresent the P-wave and the QRS complex. The P-wave represents thedepolarization of the atria and the QRS complex represents thedepolarization of the ventricles. The Q-wave of the QRS complex is theinitial downward deflection of the signal during the complex. Followingthe Q-wave is the R-wave, which is an upward deflection of the signal.Finally, the S-wave is another downward deflection. The next portion ofthe signal represents repolarization of the atria and ventricles. Morespecifically, what is generally called the T-wave represents therepolarization of the ventricles. There is no specific wave or featureof the signal that represents the repolarization of the atria becausethe generated signal is small in comparison to the T-wave. Together, theP-wave, the Q, R, and S waves, and the T-wave represent thedepolarization and repolarization waves of a heart electrical signal.

The described techniques may enhance the accuracy of determining theonsets and offsets of the various waves which comprise the repeatedcardiac electrogram signal. In particular, knowing more accurately thetiming of the onsets and offsets of the waves allows for a more accuratedetermination of the electrical-electrical delays and theelectromechanical delays. For example, the point of onset of ventriculardepolarization on surface ECG forms a fiducial with respect to whichlocal electrical activation or depolarization times and may be measuredat different sites in the ventricle. During implant of a heart lead forcardiac resynchronization therapy, the time-interval between this onsetpoint and the time of local activation or depolarization at a candidateimplant site within the ventricle may be evaluated and if it exceeds acertain threshold (e.g. 90 ms), that site may be selected for implant.

FIG. 1 is a block diagram illustrating an example configuration of asystem for determining the onsets and offsets of heart depolarizationand repolarizations waves. In the illustrated example, system 10includes a device 60, a cardiac electrogram module 70, and a motionsensing module 80. Device 60 may further include a processor 72, amemory 74, a peak detection module 76, and a wave detection module 78.

Processor 72 may include any one or more of a microprocessor, acontroller, a digital signal processor (DSP), an application specificintegrated circuit (ASIC), a field-programmable gate array (FPGA), orequivalent discrete or analog logic circuitry. In some examples,processor 72 may include multiple components, such as any combination ofone or more microprocessors, one or more controllers, one or more DSPs,one or more ASICs, or one or more FPGAs, as well as other discrete orintegrated logic circuitry. The functions attributed to processor 72herein may be embodied as software, firmware, hardware or anycombination thereof. Generally, processor 72 controls cardiacelectrogram module 70, peak detection module 76, wave detection module78, and motion sensing module 80 to determine timings of the onsets andoffsets of heart depolarization and repolarizations waves.

Memory 74 includes computer-readable instructions that, when executed byprocessor 72, causes system 10 and processor 72 to perform variousfunctions attributed to system 10 and processor 72 herein. Memory 74 mayinclude any volatile, non-volatile, magnetic, optical, or electricalmedia, such as a random access memory (RAM), read-only memory (ROM),non-volatile RAM (NVRAM), electrically-erasable programmable ROM(EEPROM), flash memory, or any other digital or analog media.

Generally, cardiac electrogram module 70 is configured sense electricalsignals from a patient. Cardiac electrogram module 70 is electricallycoupled to one or more electrodes 2, 4 . . . n by one or more leads. Insome examples, the one or more electrodes 2, 4 . . . n may be externalelectrodes, e.g., attached to the surface of a patient, or implanted atvarious locations within a patient, e.g., on or within a heart.

Peak detection module 76 may be configured to determine a maximum valueof a particular signal. For example, peak detection module 76 may beconfigured to receive the electrical signal from cardiac electrogrammodule 70 and determine the maximum value. In another example, asillustrated in FIG. 2, peak detection module 76 may be configured toreceive a signal from wave detection module 78 and determine a maximumvalue.

Wave detection module 78 determines the onsets and offsets on the heartdepolarization and repolarizations waves. Wave detection module 78 maybe configured to receive an electrical signal. For example, wavedetection module 78 may be configured to receive an electrical signalsensed by cardiac electrogram module 70. Motion sensing module 80 maydetect mechanical motion of a heart, e.g., during contraction of theheart. Motion sensing module 80 may comprise one or more sensors thatgenerate a signal that varies based on cardiac contraction or motiongenerally, such as one or more accelerometers, pressure sensors,impedance sensors, or flow sensors. Motion sensing module 80 may providean indication of the timing of motion, e.g., contraction, to device 60,e.g., to processor 72. The detected contraction may be contraction ofcardiac tissue at a particular location, e.g., a particular portion of aventricular wall.

In some examples, motion sensing module 80 may be configured to imagethe heart, or electrodes, catheters, wires, or other radio-opaquemarkers in or on the heart and identify motion associated withcontraction based on images of the heart. In some examples, motionsensing module 80 may be configured to direct ultrasound energy toward apatient's heart. Motion sensing module 80 may also be configured todetect any ultrasonic energy deflected back toward motion sensing module80 by the patient's heart. In this manner, motion sensing module 80 maycapture information about the mechanical motion (i.e. the contractingand relaxing of the ventricles and/or atria) of the heart. Systems andmethods for identifying heart mechanical contractions are described inU.S. Pat. No. 7,587,074 to Zarkh et al., which issued on Sep. 8, 2009and is entitled, “METHOD AND SYSTEM FOR IDENTIFYING OPTIMAL IMAGE WITHINA SERIES OF IMAGES THAT DEPICT A MOVING ORGAN,” and is incorporatedherein by reference in its entirety.

Processor 72 may determine values of one or more metrics, such ascardiac intervals or cardiac electromechanical delay, based on thetiming of onset and/or offset of a wave, as determined by wave detectionmodule 78, and/or the timing of contraction, as determined by motionsensing module 80. For example, processor 72 may determine QRS widthbased on an onset and offset of the QRS complex as identified by wavedetection module 78. As another example, processor 72 may determine a QTinterval based on a QRS onset and T-wave onset identified by wavedetection module 78. The processor may also determine the intervalbetween the onset of depolarization on a surface ECG lead and the timeof local electrical activation as sensed by a lead or a mapping catheteror guidewire at a site within the heart. Furthermore, as described ingreater detail below, processor 72 may determine electromechanical delaybased on a QRS onset identified by wave detection module 78 and anindication of the timing of cardiac contraction received from motionsensing module 80.

Although in FIG. 1 device 60, module 70, and module 80 are depicted asseparate, in other examples the modules and device may be combined intofewer separate components. For example, as illustrated in FIG. 15, allof the functionality of system 10 may be combined into a single device.

Furthermore, although processor 72, peak detection module 76 and wavedetection module 78 are depicted as separate functional modules in theexample of FIG. 1, their collective functionality may be provided by anynumber of physical or logical processing elements provided by one ormore co-located or networked devices. In one example, peak detectionmodule 76 and wave detection module 78 may be functional modulesexecuted by processor 72. Similarly in FIG. 2, although the variousmodules 90, 92, 94, 96, 98, and 99 are depicted as separate modules in asingle device, in other examples their functionality may be provided byany one or more devices.

FIG. 2 is a block diagram illustrating an example configuration of wavedetection module 78. In the example of FIG. 2, wave detection module 78comprises a low-pass filter 90, a window module 92, a slope module 94, arectifier module 96, a smoothing module 98, and a threshold detectionmodule 99.

Low pass filter 90 may generally be any low-pass filter designed toreduce or eliminate the high frequency components of electrical signals.Some examples of low-pass filters embodied in hardware includecapacitive low-pass filters and inductive low-pass filters. Otherlow-pass filters may be embodied entirely within software. In someembodiments, low-pass filter 90 is embodied as a combination of hardwareand software. Low-pass filter 90 may be a first, second, or higher orderfilter. In some examples, low-pass filter 90 comprises multiple filtersplaced in a succession in order to create a desired frequency response.In some examples, the low-pass filter 90 is a linear filter with amaximally flat group delay or maximally linear phase response. Aconstant group delay is a characteristic of phase response of an analogor a digital filter, which helps preserve the shape of the signal in thepass-band. In at least one example, the low-pass filter is a Besselfilter with a cut-off frequency of 15 Hz.

Window module 92 may generally window received signals. In someexamples, window module 92 may receive cardiac electrograms, and infurther examples, some of the cardiac electrograms may include a markeror makers indicating one or more points of interest. Some example ofpoints of interest could be the R-wave, the P-wave, or any other wave ofthe cardiac electrogram. In some examples, peak detection module 76 maydetect the locations of R-waves in a cardiac electrogram, according totechniques that are well known in the art, for example using a varyingthreshold. Peak detection module 76 may then place a marker within thecardiac electrogram identifying the location of the R-wave. In otherexamples, other modules or devices may detect and mark waves in thecardiac electrogram. In examples where the signal includes at least onemarker, window module 92 may window the received electrical signalaround the marker. For example, window module 92 may multiply thereceived electrical signal by zero outside of the area around the markerand by one inside of the area around the marker. In this way, windowmodule 92 may modify the received electrical signal to only containinformation in an area around the marker. In some examples, windowmodule 92 may isolate the QRS complex. In some examples, window module92 may window an area of interest of equal length around the marker, forinstance 150 ms before the marker and 150 ms after the marker. In otherexamples, the area in front of the marker may be longer or shorter thanthe area behind the marker.

Slope module 94 may generally determine the slope of a receivedelectrical signal. Some example techniques for determining a slope thatslope module 94 may use are taking the simple difference betweenadjacent points on the received electrical signal, or determining thefirst derivative of the received electrical signal.

Rectifier module 96 may generally rectify a received electrical signal.For example, rectifier module 96 may half-wave rectify the receivedelectrical signal to produce a resulting signal with information onlywhere the original signal was above zero. In another example, rectifiermodule 96 may full-wave rectify the received electrical signal toproduce a resulting signal where all the negative values of the originalsignal are now positive.

Smoothing module 98 may generally smooth a received electrical signal.For example, smoothing module 98 may be configured to increase thevalues of certain points and decrease the values of certain points so asto create a smoother signal. Some example smoothing algorithms includerectangular or un-weighted sliding average smoothing, triangularsmoothing, and Savitzky-Golay smoothing. The smoothing algorithms may beimplemented through one or more filters. In at least one example, thesmoothing filter is 10-order median filter. In another example, thesmoothing filter is a n-order median filter where n is an increasinglinear function of the sampling frequency used to digitize theelectrogram or electrocardiogram signals.

Threshold detection module 99 may generally be configured to determine athreshold and at what points a received electrical signal crosses apre-determined threshold. The threshold may be determined based on amaximum value of the signal received from smoothing module 98. Forexample, as illustrated in FIG. 2, threshold detection module 99 may beconfigured to receive, from peak detection module 76, a maximum value ofthe signal received from smoothing module 98. Threshold detection module99 may be configured to determine a threshold value based on thereceived maximum value. For example, threshold detection module 99 maydetermine the threshold to be ten percent, fifteen percent, twentypercent, or more of the maximum value. Ultimately, threshold detectionmodule 98 may determine the onsets and offsets of heart depolarizationand repolarizations waves based on at which points of a receivedelectrical signal cross a threshold.

FIGS. 3A and 3B are flow diagrams illustrating example techniques fordetermining the onsets and offsets, respectively, of heartdepolarization and repolarizations waves. The example techniques aredescribed with respect to system 10. However, in other examples, thetechniques may be practiced by a single device, such as the deviceillustrated in FIG. 12.

According to the illustrated example in FIG. 3A, wave detection module78 receives a cardiac electrogram (100). In the example, wave detectionmodule 78 may then determine a slope of the cardiac electrogram (102).Wave detection module 78 may determine a number of points within theresulting slope of the cardiac electrogram with values less than orequal to a threshold value (104).

As described above, the threshold value may be a percentage of themaximum value of the slope of the cardiac electrogram, with someexamples including ten percent, fifteen percent, and twenty percent. Inone example, the threshold value begins at ten percent of the maximumvalue of the resulting slope of the cardiac electrogram. Wave detectionmodule 78 then determines if there is at least one one point that isless than or equal to the threshold value (106). If there is at leastone point that is less than or equal to the threshold value (YES of106), then wave detection module 78 determines that a last point beforethe slope of the cardiac electrogram crosses above the threshold valueis an onset of a wave (108). If wave detection module 78 determines thatthere is not at least one point with a value less than or equal to thethreshold value (NO of 106), then wave detection module 78 may increasethe threshold value and return to step 104. For example, wave detectionmodule 78 may increase the threshold value, e.g., to be fifteen percentof the maximum value of the slope of the cardiac electrogram. Thisprocess may repeat until wave detection module 78 finds at least onepoint with a value less than or equal to a threshold value.

According to the illustrated example in FIG. 3B, wave detection module78 receives a cardiac electrogram (200). In the example, wave detectionmodule 78 may then determine a slope of the cardiac electrogram (202).Wave detection module 78 may determine a number of points within theresulting slope of the cardiac electrogram with values greater than orequal to a threshold value (204). Wave detection module 78 may alsodetermine that the last point before the slope of the cardiacelectrogram crosses below the threshold value is the offset of a wave(208).

FIGS. 4A and 4B flow diagrams illustrating example techniques fordetermining the onsets and offsets of heart depolarization andrepolarizations waves in greater detail. As with FIGS. 3A and 3B, theexample techniques are described with respect to system 10. However, inother examples, the techniques may be practiced by a single device, suchas the device illustrated in FIG. 15, or any device or combination ofdevices described herein.

According to the example illustrated in FIG. 4A, the wave detectionmodule 78 receives a cardiac electrogram (300). Wave detection module 78may then receive a wave marker. As described above, a wave marker may bea piece of information identifying a point of interest on the cardiacelectrogram. For example, the wave marker might identify, e.g., theR-wave, P-wave, or T-wave of the cardiac electrogram. In the exampleillustrated in FIG. 4A, once wave detection module 78 has received thecardiac electrogram and a wave marker, low-pass filter module 90 maylow-pass filter the cardiac electrogram (304). As described previously,the low-pass filter may reduce or eliminate the high frequencycomponents of the cardiac electrogram while preserving the shape of thewaveform in the pass-band. Window module 92 may window the cardiacelectrogram around the marker (306). In at least one example, the markermay identify an R-wave and the modules from FIG. 2 may window thecardiac electrogram around the marker to isolate a QRS complex. Slopemodule 94 may determine the slope of the windowed signal (308). In theexample technique, rectifier module 96 may rectify the slope of thewindowed signal (310). After the rectification of the signal, smoothingmodule 98, in the example technique, may smooth the signal (312).

After smoothing, wave detection module 78 may pass the signal to peakdetection module 76, which may then determine the maximum value of theresulting slope signal (314). After the maximum value of the resultingslope signal is determined, threshold detection module 99 may determinea threshold value. For example, threshold detection module 99 maydetermine that the threshold value is ten percent of the maximum valueof the resulting slope signal. Threshold detection module 99 may thendetermine if there is at least one point within the first portion of theresulting slope signal that is less than or equal to the threshold valueof ten percent (316). In one example, the first portion of the resultingslope signal is the portion that comes before the wave marker. Inanother example, the first portion is the portion of the resulting slopesignal that comes before the maximum value of the resulting slopesignal. In still another example, the first portion is the portion ofthe resulting slope signal prior to a peak of the cardiac electrogram.

In the example technique, if threshold detection module 99 determinesthat there is at least one point in the first portion of the resultingslope signal that is less than or equal to the threshold value of tenpercent (YES of 316), then the module determines that the last pointbefore the resulting slope signal crosses above the threshold value isthe onset of a wave. If threshold detection module 99 determines thatthere is not at least one point that is less than or equal to thethreshold value of ten percent (NO of 316), then threshold detectionmodule 99 may increase the threshold value. For example, thresholddetection module 99 may increase the threshold value to be fifteenpercent of the maximum value of the resulting slope signal.

Then, threshold detection module 99 may determine if there are anypoints in the first portion of the resulting slope signal that are lessthan or equal to the threshold value of fifteen percent (318). In theexample technique, if there is at least one point that is less than orequal to the threshold value of fifteen percent (YES of 318), thenthreshold detection module 99 determines that the last point before theresulting slope signal crosses above the threshold value is the onset ofa wave. If threshold detection module 99 determines that there is not atleast one point that less than or equal to the threshold value offifteen percent (NO of 318), then threshold detection module 99 mayincrease the threshold value. For example, threshold detection module 99may increase the threshold value to be twenty percent of the maximumvalue of the resulting slope signal.

Then, threshold detection module 99 may determine if there are anypoints in the first portion of the resulting slope signal that are lessthan or equal to the threshold value of twenty percent (320). In theexample technique, if there is at least one point that is less than orequal to the threshold value of twenty percent (YES of 320), thenthreshold detection module 99 determines that the last point before theresulting slope signal crosses above the threshold value is the onset ofa wave. If threshold detection module 99 determines that there is not atleast one point that is less than or equal to the threshold value oftwenty percent (NO of 320), then wave detection module 78 may abandonfinding an onset point of a wave and return to step 300 to receive a newcardiac electrogram.

According to the example illustrated in FIG. 4B, wave detection module78 receives a cardiac electrogram (400). At step 302, wave detectionmodule 78 may receive a wave marker. In the example technique, once wavedetection module 78 has received the cardiac electrogram and a wavemarker, the low-pass filter module 90 may low-pass filter the cardiacelectrogram (404). Window module 92 may also window the cardiacelectrogram around the marker (406). In at least one example, the markermay identify an R-wave and the window module 92 may window the cardiacelectrogram around the marker to isolate a QRS complex. Slope module 94may further determine the slope of the windowed signal (408). In theexample technique, rectifier module 96 may also rectify the slope of thewindowed signal (410). After rectifying the signal, smoothing module 98,in the example technique, may smooth the signal (412).

After smoothing, wave detection module 78 may pass the signal to peakdetection module 76. In the example method, peak detection module 76 maythen determine the maximum value of the resulting signal (414). Afterdetermining the maximum value of the resulting slope signal, in theexample technique, threshold detection module 99 may determine athreshold value. For example, threshold detection module 99 maydetermine that the threshold value is ten percent of the maximum valueof the resulting slope signal. In the example technique, thresholddetection module 99 may then determine all of the points within thesecond portion of the resulting slope signal that are greater than orequal to the threshold value of ten percent (416). In one example, thesecond portion of the resulting slope signal is the portion that comesafter the wave marker. In another example, the second portion is theportion of the resulting slope signal that comes after the maximum valueof the resulting slope signal. In still another example, the firstportion is the portion of the resulting slope signal prior to a peak ofthe cardiac electrogram. In the example technique, wave detection module78 determines that the last point before the resulting slope signalcrosses below the threshold value is the offset of a wave.

FIGS. 5-8 illustrate example cardiac electrogram signals along withvarious aspects of the present disclosure. For example, FIG. 5illustrates an example cardiac electrogram 502 that may be passed towave detection module 78 at the beginning of the example techniquesdescribed in FIGS. 3-4. FIG. 6 illustrates a cardiac electrogram 502along with wave markers 504. In the example of FIG. 6, wave markers 504are R-wave markers. FIG. 7 also depicts an example cardiac electrogram502 and R-wave markers 504. FIG. 7 also depicts example windows 506 thatwave detection module 78, e.g. through window module 92, may generateabout the wave markers 504. In the example of FIG. 7, windows 506 areconfigured to generally include the QRS complexes and isolate the QRScomplexes from the whole cardiac electrogram, e.g. exclude other wavessuch as the P-wave and T-wave. In other examples, the windows 506 may beconfigured to generally include P or T-waves and isolate those wavesfrom the whole cardiac electrogram. FIG. 8 further illustrates anexample cardiac electrogram 502. FIG. 8 also illustrates the points thatwave detection module 78 has determined are the onset of the waves (morespecifically, in the example illustrated in FIG. 8, the onset of the QRSwaves).

FIGS. 9 and 10 illustrate example cardiac electrograms combined withexample heart mechanical contraction information. For example, FIG. 9depicts an example surface ECG signal 702 along with a cardiaccontraction curve 704. Cardiac contraction curve 704 illustrates thecontraction of a local point on the heart with respect to time. Thecardiac contraction curve may be a signal generated by any of thesensors discussed above, for example accelerometers, pressure sensors,impedance sensors, or flow sensors associated with motion sensing module80. In other examples, the cardiac contraction curve may be generated bythe techniques described in the U.S. Pat. No. 7,587,074 to Zarkh et al.,which issued on Sep. 8, 2009 and is entitled, “METHOD AND SYSTEM FORIDENTIFYING OPTIMAL IMAGE WITHIN A SERIES OF IMAGES THAT DEPICT A MOVINGORGAN,” incorporated herein. In still other examples, the cardiaccontraction curve may be generated by sensors within the tip of anintracardiac electrode. For example, the tip of a cardiac electrode maycontain one or more motion sensors which generates a signal as the tipof the electrode moves in relation to the region of the heart in whichit is implanted.

Also depicted in FIG. 9 are the timing of the detected onset ofdepolarization of the heart from the surface ECG 706 and the timing ofthe local cardiac contraction 708. The delay between the onset ofdepolarization 706 from the surface ECG and the timing of local cardiaccontraction 708 may be described as the global electromechanical delay710. As will be described in greater detail in FIGS. 11-12, measuringthe global electromechanical delay 710 delay at various locations on theheart may help physicians to select potential intracardiac lead implantsites.

FIG. 10 depicts an example unipolar cardiac electrogram signal 752 froman electrode at a localized position on or within a heart, along with acardiac contraction curve 754 from the same localized position on orwithin the heart. FIG. 10 also depicts the timing of the detected onsetof depolarization of the heart at the localized position 756 and thetiming of the local cardiac contraction 758. In contrast to FIG. 9, FIG.10 displays the difference in timing between the local depolarization ofthe heart 756 and the timing of the local cardiac contraction 758 as thelocal electromechanical delay 760 or local electromechanical latency760. The local electromechanical delay 760 differs from the globalelectromechanical delay 710 in that local electromechanical delay 760measures the differences in timings both at the localized heart tissueand the global electromechanical delay 710 measures the difference intimings between the depolarization 706 detected at the surface ECG andthe local mechanical contraction 708.

FIG. 11 is a flow diagram describing an example method for selecting animplant site for an intracardiac lead. In the example method, a system,such as system 10 of FIG. 1, may determine the intrinsic globalelectromechanical delay at a plurality of potential intracardiac leadimplant sites. To determine the intrinsic global electromechanicaldelay, a system may determine the timing of a detected onset ofdepolarization from a surface ECG and a timing of cardiac contraction atvarious locations on the heart during an intrinsic heart rhythm. Thedifference between the timings is the global electromechanical delay(800). Then, in the example technique, a system, e.g., processor 72, ora user of the system, may select candidate intracardiac lead implantsites as sites that have a global electromechanical delay above acertain threshold (802). Finding particular candidate sites with a longglobal electromechanical delay may indicate that the particular locationof the heart contracts late and may be the reason for dyssynchrony ofcardiac wall motion. Selecting an implant site to provide pacing on ornear that site may enhance the effectiveness of the electrical pacingtherapy to restore cardiac synchrony.

In the example technique, processor 72 may then determine the localelectromechanical delay of the selected candidate implant sites duringan intrinsic heart rhythm (804). To determine the localelectromechanical delay, processor 72 may determine the timing of adetected onset of depolarization from an electrogram taken at thepotential implant site and a timing of the local cardiac contraction atthe potential implant sites. The local electromechanical delay is thedifference between the determined timings. Then, in the exampletechnique, processor 72 may automatically select a subset of potentialimplant sites as sites that have a local electromechanical delay lessthan a threshold (806). In other examples, a user may manually selectthe potential implants based on information from processor 72. Candidateimplant sites that have a long local electromechanical delay mayindicate a region of scarred or non-viable or otherwise non-conductivetissue. Implanting an intracardiac lead at those locations may reducethe effectiveness of the electrical stimulation therapy.

Processor 72 may then deliver electrical pacing stimulus to the heart atthe potential implant sites (808). Processor 72 may measure variousmetrics such as global or local electromechanical delay during pacing ateach potential implant site. In the example technique, processor 72 maythen automatically select one or more implant sites based on thereduction of a metric during pacing compared to the intrinsic baseline.In other examples, a user may select one or more implant sites based oninformation from processor 72. For example, processor 72, or a user, mayselect one or more implant sites based on the reduction of localelectromechanical, global electromechanical delay, or cardiacdyssynchrony, which is a measure of the distribution and dispersion(e.g. range, standard deviation, etc.) of global or localelectromechanical delays at various cardiac sites. In other exampletechniques, processor 72 or a user may select other parameters based onthe global and/or local electromechanical delay. For example, processor72 may also vary parameters of the pacing, such as A-V delay, V-V delay,and pacing electrode configuration, and select a particular pacingelectrode configuration or pacing intervals for cardiacresynchronization therapy based on the metric. In other examples, a usermay ultimately select the pacing electrode configuration or pacingintervals based on the metric.

FIG. 12 is flow diagram illustrating another example technique forselecting an implant site for an intracardiac lead. In the exampletechnique, a system, such as system 10, may determine a globalelectromechanical delay at a potential implant site during an intrinsicheart rhythm (850). In the example technique, a system may thendetermine local electromechanical delay at the same potential implantsite during an intrinsic heart rhythm (852). A system may then determinea baseline electromechanical dyssynchrony index for an intrinsic heartrhythm (854). A system may determine the baseline electromechanicaldyssynchrony index by comparing the differences between the global andlocal electromechanical delays during the intrinsic heart rhythm.

In the example technique, a system may then determine a globalelectromechanical delay at the same potential implant site during thedelivery of electrical pacing therapy (856). In the example technique, asystem may then determine local electromechanical delay at the samepotential implant site during the delivery of electrical pacing therapy(858). A system may then determine an electromechanical dyssynchronyindex during pacing therapy (860).

In the example technique, a system may then determine the percentagechange between the baseline electromechanical dyssynchrony index and theelectromechanical dyssynchrony index determined during pacing therapy(862). A system may then determine if there was a reduction from thebaseline dyssynchrony index at the tested potential implant site above athreshold percentage (864). If the system determines that theperformance of the pacing at the potential implant site did produce areduction in the baseline electromechanical dyssynchrony index above athreshold percentage (YES of 864), the system may select that implantsite (866) for intracardiac lead implantation. In some examples, aprocessor of the system, such as processor 72, may automatically selectthe implant site according to the described techniques. In otherexamples, a user, based on information from a processor may manuallyselect the implant site according to the described techniques. If thesystem determines that pacing at the potential site did not reduce thebaseline electromechanical dyssynchrony index by a threshold percentageamount (NO of 864), the system may check to see if there are otherpotential lead implant sites to check (868). If there are still otherimplant sites to check (YES of 868), in the example technique, a systemmay change the potential lead implant site (870) and return to step 856.If there are no more potential lead implant sites to check (NO of 868),a system may select the implant site with the greatest reduction in thebaseline electromechanical dyssynchrony index as the preferredintracardiac lead implant site.

In another example, the system may detect the time-interval fromdelivery of pace at a localized region within the heart to the onset ofdepolarization on a surface ECG lead, with the pace delivered at maximumpacing voltage (˜6V to ensure that maximum energy is delivered duringpacing) and at a short atrio-ventricular (A-V) interval (<=60 ms). Ifthis time interval exceeds a certain threshold, then the system willindicate that particular area is not a suitable site for implanting thepacing lead. This is because a long time delay between delivery of localpace (at maximum energy) and onset of global depolarization on surfaceECG indicates that the substrate of that area in the heart may benon-viable or otherwise not be a suitable site for implanting the pacinglead, e.g., comprised of scar tissue. FIG. 16 illustrates an example ofthe time-delay between the delivery of pacing and the onset ofdepolarization. FIG. 16 illustrates an example ECG signal 990. Arrow 992points to the point in time when a patient received pacing at alocalized region of the heart. Arrow 994 points to the determined pointin time of the onset of the depolarization wave. The onset of thedepolarization wave may be found, for example, according the techniquesdescribed in this disclosure. Time period 996 is the difference in timebetween the beginning of pacing and the onset of the depolarization waveat a localized region of the heart. The time period 996 may also betermed the local electrical-electrical delay.

FIGS. 13-15 are conceptual diagrams illustrating an example system 910that determines the onset and offset points of heart depolarization andrepolarization waves of patient 914 according to the techniquesdescribed herein. As with the previously described system, in oneexample, system 910 may detect the onset and offset points of heartdepolarization and repolarization waves in order to select a preferredlocation for implanting an intracardiac lead. In other examples, system910 may detect the onset and offset points of heart depolarization andrepolarization waves in order to select other parameters based on theelectromechanical delay. For example, the system may select a particularpacing electrode configuration or pacing intervals for cardiacresynchronization therapy. In another example, with multipolar leadsoffering choices of more than one pacing electrode (cathode) in theventricle, the system/device may automatically pace from each of thepacing electrodes at maximum pacing voltage and at a nominalatrio-ventricular delay (˜100 ms) and measure onsets and offsets of theresulting depolarization waveforms on a far-field electrogram or on aleadless ECG or on a surface ECG lead, and choose the pacing electrodewhich produces the minimum difference between the offset of the localelectrogram and the corresponding far-field onset, for delivery ofcardiac resynchronization therapy. Alternatively, the pacing electrodewhich produces the narrowest far-field electrogram or surface ECG signalcalculated as the difference between the offset and onset could bechosen. As illustrated in example diagram FIG. 13, a system 910 includesimplantable medical device (IMD) 916, which is connected to leads 918,920, and 922, and communicatively coupled to a programmer 924. IMD 916senses electrical signals attendant to the depolarization andrepolarization of heart 912, e.g., a cardiac EGM, via electrodes on oneor more of leads 918, 920 and 922 or a housing of IMD 916. IMD 916 alsodelivers therapy in the form of electrical signals to heart 912 viaelectrodes located on one or more leads 918, 920, and 922 or a housingof IMD 916, such pacing, cardioversion and/or defibrillation pulses. IMD916 may include or be coupled to various sensors, such as one or moreaccelerometers, for detecting other physiological parameters of patient14, such as activity or posture.

In some examples, programmer 924 takes the form of a handheld computingdevice, computer workstation, or networked computing device thatincludes a user interface for presenting information to and receivinginput from a user. A user, such as a physician, technician, surgeon,electrophysiologist, or other clinician, may interact with programmer924 to communicate with IMD 916. For example, the user may interact withprogrammer 924 to retrieve physiological or diagnostic information fromIMD 916. A user may also interact with programmer 924 to program IMD916, e.g., select values for operational parameters of the IMD.

IMD 916 and programmer 924 may communicate via wireless communicationusing any techniques known in the art. Examples of communicationtechniques may include, for example, low frequency or radiofrequency(RF) telemetry, but other techniques are also contemplated. In someexamples, programmer 924 may include a programming head that may beplaced proximate to the patient's body near the IMD 916 implant site inorder to improve the quality or security of communication between IMD916 and programmer 924. In other examples, programmer 924 may be locatedremotely from IMD 916, and communicate with IMD 916 via a network.

The techniques for identifying onsets and/or offsets of cardiacelectrogram waves may be performed by IMD 916, e.g., by a processor ofIMD 916, based on one or more cardiac electrograms sensed by the IMD. Inother examples, as described previously, some or all of the functionsascribed to IMD 916 or a processor thereof may be performed by one ormore other devices, such as programmer 294 or a workstation (not shown),or a processor thereof. For example, programmer 924 may process EGMsignals received from IMD 916 and/or cardiac mechanical contractioninformation to according to the techniques described herein.Furthermore, although described herein with respect to an IMD, in otherexamples, the techniques described herein may be performed by orimplemented in an external medical device, which may be coupled to apatient via percutaneous or transcutaneous leads.

FIG. 14 is a conceptual diagram illustrating IMD 916 and leads 918, 920,and 922 of system 910 in greater detail. In the illustrated example,bipolar electrodes 940 and 942 are located adjacent to a distal end oflead 918. In addition, bipolar electrodes 944 and 946 are locatedadjacent to a distal end of lead 920, and bipolar electrodes 948 and 950are located adjacent to a distal end of lead 922.

In the illustrated example, electrodes 940, 944 and 948 take the form ofring electrodes, and electrodes 942, 946 and 950 may take the form ofextendable helix tip electrodes mounted retractably within insulativeelectrode heads 952, 954 and 956, respectively. Leads 918, 920, 922 alsoinclude elongated electrodes 962, 964, 966, respectively, which may takethe form of a coil. In some examples, each of the electrodes 940, 942,944, 946, 948, 950, 962, 964 and 966 is electrically coupled to arespective conductor within the lead body of its associated lead 918,920, 922, and thereby coupled circuitry within IMD 916.

In some examples, IMD 916 includes one or more housing electrodes, suchas housing electrode 904 illustrated in FIG. 14, which may be formedintegrally with an outer surface of hermetically-sealed housing 908 ofIMD 916 or otherwise coupled to housing 908. In some examples, housingelectrode 904 is defined by an uninsulated portion of an outward facingportion of housing 908 of IMD 916. Other division between insulated anduninsulated portions of housing 908 may be employed to define two ormore housing electrodes. In some examples, a housing electrode comprisessubstantially all of housing 908.

As described in further detail with reference to FIG. 15, housing 908encloses a signal generator that generates therapeutic stimulation, suchas cardiac pacing, cardioversion and defibrillation pulses, as well as asensing module for sensing electrical signals attendant to thedepolarization and repolarization of heart 912. Housing 908 may alsoenclose a wave detection module that detects the onsets and offsets ofheart depolarization and repolarization waves. The wave detection modulemay be enclosed within housing 908. Alternatively, the wave detectionmodule may housed in a remote piece of equipment, such as programmer 924or a workstation (not shown) and communicate with the IMD 916 throughwireless communication.

IMD 916 senses electrical signals attendant to the depolarization andrepolarization of heart 912 via electrodes 904, 940, 942, 944, 946, 948,950, 962, 964 and 966. IMD 916 may sense such electrical signals via anybipolar combination of electrodes 940, 942, 944, 946, 948, 950, 962, 964and 966. Furthermore, any of the electrodes 940, 942, 944, 946, 948,950, 962, 964 and 966 may be used for unipolar sensing in combinationwith housing electrode 904.

In some examples, IMD 916 delivers pacing pulses via bipolarcombinations of electrodes 940, 942, 944, 946, 948 and 950 to producedepolarization of cardiac tissue of heart 912. In some examples, IMD 16delivers pacing pulses via any of electrodes 940, 942, 944, 946, 948 and950 in combination with housing electrode 904 in a unipolarconfiguration. Furthermore, IMD 916 may deliver cardioversion ordefibrillation pulses to heart 12 via any combination of elongatedelectrodes 962, 964, 966, and housing electrode 904.

The illustrated numbers and configurations of leads 918, 920, and 922and electrodes are merely examples. Other configurations, i.e., numberand position of leads and electrodes, are possible. In some examples,system 910 may include an additional lead or lead segment having one ormore electrodes positioned at different locations in the cardiovascularsystem for sensing and/or delivering therapy to patient 914. Forexample, instead of or in addition to intracardiac leads 918, 920 and922, system 910 may include one or more epicardial or subcutaneous leadsnot positioned within the heart. In some examples, the subcutaneousleads may sense a subcutaneous cardiac electrogram, for example thefar-field electrogram between the SVC coil and the can. The subcutaneouscardiac electrogram may substitute for the surface ECG in determiningthe global electromechanical delay.

FIG. 15 is a block diagram illustrating an example configuration of IMD916. In the illustrated example, IMD 916 includes a processor 970,memory 972, signal generator 974, sensing module 976, telemetry module978, motion sensing module 980, wave detection module 982 and peakdetection module 984. Memory 972 includes computer-readable instructionsthat, when executed by processor 970, causes IMD 916 and processor 970to perform various functions attributed to IMD 916 and processor 970herein. Memory 972 may include any volatile, non-volatile, magnetic,optical, or electrical media, such as a random access memory (RAM),read-only memory (ROM), non-volatile RAM (NVRAM), electrically-erasableprogrammable ROM (EEPROM), flash memory, or any other digital or analogmedia.

Processor 970 may include any one or more of a microprocessor, acontroller, a digital signal processor (DSP), an application specificintegrated circuit (ASIC), a field-programmable gate array (FPGA), orequivalent discrete or analog logic circuitry. In some examples,processor 970 may include multiple components, such as any combinationof one or more microprocessors, one or more controllers, one or moreDSPs, one or more ASICs, or one or more FPGAs, as well as other discreteor integrated logic circuitry. The functions attributed to processor 970herein may be embodied as software, firmware, hardware or anycombination thereof. Generally, processor 970 controls signal generator974 to deliver stimulation therapy to heart 912 of patient 914 accordingto a selected one or more of therapy programs or parameters, which maybe stored in memory 972. As an example, processor 970 may control signalgenerator 974 to deliver electrical pulses with the amplitudes, pulsewidths, frequency, or electrode polarities specified by the selected oneor more therapy programs.

Signal generator 974 is configured to generate and deliver electricalstimulation therapy to patient 912. As shown in FIG. 15, signalgenerator 974 is electrically coupled to electrodes 94, 940, 942, 944,946, 948, 950, 962, 964, and 966, e.g., via conductors of the respectiveleads 918, 920, and 922 and, in the case of housing electrode 904,within housing 908. For example, signal generator 974 may deliverpacing, defibrillation or cardioversion pulses to heart 912 via at leasttwo of electrodes 94, 940, 942, 944, 946, 948, 950, 962, 964, and 966.In other examples, signal generator 974 delivers stimulation in the formof signals other than pulses, such as sine waves, square waves, or othersubstantially continuous time signals.

Signal generator 974 may include a switch module (not shown) andprocessor 970 may use the switch module to select, e.g., via adata/address bus, which of the available electrodes are used to deliverthe electrical stimulation. The switch module may include a switcharray, switch matrix, multiplexer, or any other type of switching devicesuitable to selectively couple stimulation energy to selectedelectrodes. Electrical sensing module 976 monitors electrical cardiacsignals from any combination of electrodes 904, 940, 942, 944, 946, 948,950, 962, 964, and 966. Sensing module 976 may also include a switchmodule which processor 970 controls to select which of the availableelectrodes are used to sense the heart activity, depending upon whichelectrode combination is used in the current sensing configuration.

Sensing module 976 may include one or more detection channels, each ofwhich may comprise an amplifier. The detection channels may be used tosense the cardiac signals. Some detection channels may detect events,such as R-waves or P-waves, and provide indications, such as wavemarkers, of the occurrences of such events to processor 970. One or moreother detection channels may provide the signals to an analog-to-digitalconverter, for conversion into a digital signal for processing oranalysis by processor 970.

For example, sensing module 976 may comprise one or more narrow bandchannels, each of which may include a narrow band filteredsense-amplifier that compares the detected signal to a threshold. If thefiltered and amplified signal is greater than the threshold, the narrowband channel indicates that a certain electrical cardiac event, e.g.,depolarization, has occurred. Processor 970 then uses that detection inmeasuring frequencies of the sensed events.

In one example, at least one narrow band channel may include an R-waveor P-wave amplifier. In some examples, the R-wave and P-wave amplifiersmay take the form of an automatic gain controlled amplifier thatprovides an adjustable sensing threshold as a function of the measuredR-wave or P-wave amplitude. Examples of R-wave and P-wave amplifiers aredescribed in U.S. Pat. No. 5,117,824 to Keimel et al., which issued onJun. 2, 1992 and is entitled, “APPARATUS FOR MONITORING ELECTRICALPHYSIOLOGIC SIGNALS,” and is incorporated herein by reference in itsentirety.

In some examples, sensing module 976 includes a wide band channel whichmay comprise an amplifier with a relatively wider pass band than thenarrow band channels. Signals from the electrodes that are selected forcoupling to this wide-band amplifier may be converted to multi-bitdigital signals by an analog-to-digital converter (ADC) provided by, forexample, sensing module 976 or processor 970. Processor 970 may analyzethe digitized versions of signals from the wide band channel. Processor970 may employ digital signal analysis techniques to characterize thedigitized signals from the wide band channel to, for example, detect andclassify the patient's heart rhythm.

Processor 970 may detect and classify the patient's heart rhythm basedon the cardiac electrical signals sensed by sensing module 976 employingany of the numerous signal processing methodologies known in the art.For example, processor 970 may maintain escape interval counters thatmay be reset upon sensing of R-waves by sensing module 976. The value ofthe count present in the escape interval counters when reset by senseddepolarizations may be used by processor 970 to measure the durations ofR-R intervals, which are measurements that may be stored in memory 972.Processor 970 may use the count in the interval counters to detect atachyarrhythmia, such as ventricular fibrillation or ventriculartachycardia. A portion of memory 972 may be configured as a plurality ofrecirculating buffers, capable of holding series of measured intervals,which may be analyzed by processor 970 to determine whether thepatient's heart 912 is presently exhibiting atrial or ventriculartachyarrhythmia.

In some examples, processor 970 may determine that tachyarrhythmia hasoccurred by identification of shortened R-R interval lengths. Generally,processor 970 detects tachycardia when the interval length falls below360 milliseconds (ms) and fibrillation when the interval length fallsbelow 320 ms. These interval lengths are merely examples, and a user maydefine the interval lengths as desired, which may then be stored withinmemory 972. This interval length may need to be detected for a certainnumber of consecutive cycles, for a certain percentage of cycles withina running window, or a running average for a certain number of cardiaccycles, as examples.

In some examples, an arrhythmia detection method may include anysuitable tachyarrhythmia detection algorithms. In one example, processor970 may utilize all or a subset of the rule-based detection methodsdescribed in U.S. Pat. No. 5,545,186 to Olson et al., entitled,“PRIORITIZED RULE BASED METHOD AND APPARATUS FOR DIAGNOSIS AND TREATMENTOF ARRHYTHMIAS,” which issued on Aug. 13, 1996, or in U.S. Pat. No.5,755,736 to Gillberg et al., entitled, “PRIORITIZED RULE BASED METHODAND APPARATUS FOR DIAGNOSIS AND TREATMENT OF ARRHYTHMIAS,” which issuedon May 26, 1998. U.S. Pat. No. 5,545,186 to Olson et al. U.S. Pat. No.5,755,736 to Gillberg et al. is incorporated herein by reference intheir entireties. However, other arrhythmia detection methodologies mayalso be employed by processor 970 in other examples. For example, EGMmorphology may be considered in addition to or instead of intervallength for detecting tachyarrhythmias.

Generally, processor 970 detects a treatable tachyarrhythmia, such asVF, based on the EGM, e.g., the R-R intervals and/or morphology of theEGM, and selects a therapy to deliver to terminate the tachyarrhythmia,such as a defibrillation pulse of a specified magnitude. The detectionof the tachyarrhythmia may include a number of phases or steps prior todelivery of the therapy, such as first phase, sometimes referred to asdetection, in which a number of consecutive or proximate R-R intervalssatisfies a first number of intervals to detect (NID) criterion, asecond phase, sometimes referred to as confirmation, in which a numberof consecutive or proximate R-R intervals satisfies a second, morerestrictive NID criterion. Tachyarrhythmia detection may also includeconfirmation based on EGM morphology or other sensors subsequent to orduring the second phase.

In the illustrated example, IMD 916 also includes peak detection module980, wave detection module 982, and motion sensing module 984. Peakdetection module 980 and wave detection module 982 may be configured andprovide the functionality ascribed to peak detection module 76 and wavedetection module 78 herein. Peak detection module 980 may be configuredto determine a maximum value of a particular signal. For example, peakdetection module 980 may be configured to receive an electrical signalfrom wave detection module 982 or processor 970 and determine a maximumvalue of the received signal. Peak detection module 980 may, in someexamples, comprise a narrow-band channel of sensing module 976 that isconfigured to detect R-waves, P-waves, or T-waves in cardiac electrogramsignals, e.g., using an amplifier with automatically adjustingthreshold.

Generally, wave detection module 982 determines the onsets and offsetson the heart depolarization and repolarizations waves. Wave detectionmodule 982 may be similar to the wave detection module describedpreviously, e.g. wave detection module 78, and more accurately describedin FIG. 2. For example, wave detection module may include a low-passfilter, a window module, a slope module, a rectifier module, a smoothingmodule, and a threshold detection module. Wave detection module 982 mayperform substantially similar to the wave detection module describedpreviously in this application.

Peak detection module 980 and wave detection module 982 may receive acardiac electrogram from sensing module 976, e.g., from a wide-bandchannel of the sensing module. In some examples, the cardiac electrogrammay be a far-field cardiac electrogram, e.g., between superior vena cavacoil 766 and housing electrode 904. A far-field cardiac electrogram maybe used in the manner described herein with respect to a surface ECG,e.g., to determine a global electromechanical delay. In some examples,the cardiac electrogram may be a unipolar cardiac electrogram betweenhousing electrode 906 and any of electrodes 942, 944, 946 and 950. Theunipolar cardiac electrogram may be received from sensing module 976,e.g., via a wide-band channel of the sensing module, and may be used inthe manner described herein with respect to local cardiac electrogramsignals, e.g., to determine local electromechanical delays.

Motion sensing module 984 may sense the mechanical contraction of theheart, e.g., at one or more cardiac sites. Motion sensing module 984 maybe electrically coupled to one or more sensors that generate a signalthat varies based on cardiac contraction or motion generally, such asone or more accelerometers, pressure sensors, impedance sensors, or flowsensors. The detected contraction may be contraction of cardiac tissueat a particular location, e.g., a particular portion of a ventricularwall.

Although processor 970 and wave detection module 982 are illustrated asseparate modules in FIG. 15, processor 970 and wave detection module 982may be incorporated in a single processing unit. Wave detection module982, and any of its components, may be a component of or module executedby processor 970.

Telemetry module 978 includes any suitable hardware, firmware, softwareor any combination thereof for communicating with another device, suchas programmer 924 (FIG. 13). Under the control of processor 970,telemetry module 978 may receive downlink telemetry from and send uplinktelemetry to programmer 924 with the aid of an antenna, which may beinternal and/or external. In some examples, processor 970 may transmitcardiac signals produced by sensing module 976 and/or signals generatedby heart sound sensor 982 to programmer 924. Processor 970 may alsogenerate and store marker codes indicative of different cardiac eventsthat sensing module 976 or heart sound analyzer 980 detects, andtransmit the marker codes to programmer 924. An example IMD withmarker-channel capability is described in U.S. Pat. No. 4,374,382 toMarkowitz, entitled, “MARKER CHANNEL TELEMETRY SYSTEM FOR A MEDICALDEVICE,” which issued on Feb. 15, 1983 and is incorporated herein byreference in its entirety. Information which processor 970 may transmitto programmer 924 via telemetry module 978 may also include indicationsof treatable rhythms, and indications of non-treatable rhythms in whichthe EGM based indication indicated that the rhythm was treatable and theheart sound based indication indicated that the rhythm wasnon-treatable. Such information may be included as part of a markerchannel with an EGM.

The techniques described in this disclosure, including those attributedto IMD wave detection module 80, programmer 24, or various constituentcomponents, may be implemented, at least in part, in hardware, software,firmware or any combination thereof. For example, various aspects of thetechniques may be implemented within one or more processors, includingone or more microprocessors, digital signal processors (DSPs),application specific integrated circuits (ASICs), field programmablegate arrays (FPGAs), or any other equivalent integrated or discretelogic circuitry, as well as any combinations of such components,embodied in programmers, such as physician or patient programmers,stimulators, image processing devices or other devices. The term“processor” or “processing circuitry” may generally refer to any of theforegoing logic circuitry, alone or in combination with other logiccircuitry, or any other equivalent circuitry.

Such hardware, software, firmware may be implemented within the samedevice or within separate devices to support the various operations andfunctions described in this disclosure. In addition, any of thedescribed units, modules or components may be implemented together orseparately as discrete but interoperable logic devices. Depiction ofdifferent features as modules or units is intended to highlightdifferent functional aspects and does not necessarily imply that suchmodules or units must be realized by separate hardware or softwarecomponents. Rather, functionality associated with one or more modules orunits may be performed by separate hardware or software components, orintegrated within common or separate hardware or software components.

When implemented in software, the functionality ascribed to the systems,devices and techniques described in this disclosure may be embodied asinstructions on a computer-readable medium such as random access memory(RAM), read-only memory (ROM), non-volatile random access memory(NVRAM), electrically erasable programmable read-only memory (EEPROM),FLASH memory, magnetic data storage media, optical data storage media,or the like. The instructions may be executed to support one or moreaspects of the functionality described in this disclosure.

The invention claimed is:
 1. A method comprising: receiving, by sensing circuitry of an implanted medical device, a cardiac electrogram; determining, by processing circuitry, a wave marker that identifies a wave within the cardiac electrogram; determining, by the processing circuitry, a window of the cardiac electrogram around the wave marker, the window of the cardiac electrogram comprising a single wave included in the cardiac electrogram, wherein the single wave is one of a single R-wave, a single P-wave, a single T-wave, or a single QRS complex; determining, by the processing circuitry, a slope at a number of points of the cardiac electrogram within the window; determining, by the processing circuitry, a maximum value of the slope of the cardiac electrogram within the window; determining, by the processing circuitry, a threshold value based on a percentage of the maximum value of the slope, wherein determining the threshold value comprises increasing the percentage of the maximum value until the slope at one or more of the points of the cardiac electrogram within the window is less than or equal to the threshold value; and identifying, by the processing circuitry, a last point timewise of the one or more points that are less than or equal to the threshold value in the cardiac electrogram before the slope of the cardiac electrogram crosses the threshold value as one of an onset or an offset of a wave.
 2. The method of claim 1, wherein the cardiac electrogram comprises one of a surface electrocardiogram, a local cardiac electrogram, or a subcutaneous cardiac electrogram.
 3. The method of claim 1, wherein identifying the last point comprises identifying the last point of the cardiac electrogram before the slope of the cardiac electrogram exceeds the threshold value as the onset of the wave.
 4. The method of claim 3, wherein identifying the last point comprises identifying the last point within a portion of the cardiac electrogram prior to at least one of the maximum of the slope or a peak of the cardiac electrogram.
 5. The method of claim 1, wherein identifying the last point comprises identifying the last point of the cardiac electrogram before the slope of the cardiac electrogram falls below the threshold value as the offset of the wave.
 6. The method of claim 5, wherein identifying the last point comprises identifying the last point within a portion of the cardiac electrogram after at least one of the maximum of the slope or a peak of the cardiac electrogram.
 7. The method of claim 1, further comprising determining, by processing circuitry, at least one of a QRS width or a Q-T interval based on the identified onset or offset of the wave.
 8. The method of claim 1, further comprising: receiving, by motion sensing circuitry, an indication of local ventricular motion associated with a cardiac contraction; determining, by the processing circuitry, an electromechanical delay between the identified onset and the local ventricular motion; and providing, by the processing circuitry, the electromechanical delay for configuration of cardiac resynchronization therapy.
 9. The method of claim 8, further comprising selecting, by the processing circuitry, at least one of a pacing site, pacing electrode configuration, or pacing interval for cardiac resynchronization therapy based on the determined electromechanical delay.
 10. The method of claim 8, wherein the cardiac electrogram comprises a surface electrocardiogram far-field cardiac electrogram, or subcutaneous electrocardiogram, wherein determining an electromechanical delay comprises determining a global electromechanical delay for each of a plurality of potential pacing sites, the method further comprising selecting, by the processing circuitry, a subset of the pacing sites based on the global electromechanical delays for the pacing sites exceeding a global electromechanical delay threshold.
 11. The method of claim 10, wherein the cardiac electrogram comprises a plurality of local cardiac electrograms from each of the subset of pacing sites, wherein determining an electromechanical delay comprises determining a local electromechanical delay for each of the subset pacing sites, the method further comprising identifying, by the processing circuitry, one or more of the subset of pacing sites as candidate pacing sites based on local electromechanical delays for the candidate pacing sites being less than a local electromechanical delay threshold.
 12. The method of claim 11, further comprising: pacing, by the implantable medical device, at the candidate pacing sites; during pacing at each of the candidate pacing sites, determining, by the processing circuitry, an electromechanical delay for each of a plurality of ventricular locations and determining an electromechanical dyssynchrony index based on the electromechanical delays; and selecting, by the processing circuitry, one or more of the candidate pacing sites for cardiac resynchronization therapy based on dyssynchrony indices for the candidate pacing sites.
 13. The method of claim 1, wherein determining the wave marker comprises determining a wave marker indicating the location of an R-wave in the cardiac electrogram, and wherein determining the window comprises determining a window of the cardiac electrogram comprising the single QRS complex.
 14. A system comprising: sensing circuitry of an implantable medical device, the sensing circuitry configured to receive a cardiac electrogram; and processing circuitry configured to: determine a wave marker that identifies a wave within the cardiac electrogram; determine a window of the cardiac electrogram around the wave marker, the window of the cardiac electrogram comprising a single wave included in the cardiac electrogram, wherein the single wave is one of a single R-wave, a single P-wave, a single T-wave, or a single QRS complex; determine a slope at a number of points of the cardiac electrogram within the window; determine a maximum value of the slope of the cardiac electrogram within the window; determine a threshold value based on a percentage of the maximum value of the slope, wherein the processing circuitry is configured to increase the percentage of the maximum value until the slope at one or more of the points of the cardiac electrogram within the window is less than or equal to the threshold value; and identify a last point timewise of the one or more points that are less than or equal to the threshold value in the cardiac electrogram before the slope of the cardiac electrogram crosses the threshold value as one of an onset or an offset of a wave.
 15. The system of claim 14, wherein identifying the last point comprises identifying the last point of the cardiac electrogram before the slope of the cardiac electrogram exceeds the threshold value as the onset of the wave.
 16. The system of claim 15, wherein identifying the last point comprises identifying the last point within a portion of the cardiac electrogram prior to at least one of the maximum of the slope or a peak of the cardiac electrogram.
 17. The system of claim 14, wherein identifying the last point comprises identifying the last point of the cardiac electrogram before the slope of the cardiac electrogram falls below the threshold value as the offset of the wave.
 18. The system of claim 17, wherein identifying the last point comprises identifying the last point within a portion of the cardiac electrogram after at least one of the maximum of the slope or a peak of the cardiac electrogram.
 19. The system of claim 14, wherein the processing circuitry is configured to: determine a wave marker indicating the location of an R-wave in the cardiac electrogram, and determine a window of the cardiac electrogram comprising the single QRS complex.
 20. A non-transitory computer readable storage medium for storing a set of instructions which, when implemented in a medical device system causes the system to: receive a cardiac electrogram; determine a wave marker that identifies a wave within the cardiac electrogram; determine a window of the cardiac electrogram around the wave marker, the window of the cardiac electrogram comprising a single wave included in the cardiac electrogram, wherein the single wave is one of a single R-wave, a single P-wave, a single T-wave, or a single QRS complex; determine a slope at a number of points of the cardiac electrogram within the window; determine a maximum value of the slope of the cardiac electrogram within the window; determine a threshold value based on a percentage of the maximum value of the slope, wherein the set of instructions causes the system to increase the percentage of the maximum value until the slope at one or more of the points of the cardiac electrogram within the window is less than or equal to the threshold value; and identify a last point timewise of the one or more points that are less than or equal to the threshold value in the cardiac electrogram before the slope of the cardiac electrogram crosses the threshold value as one of an onset or an offset of a wave.
 21. The non-transitory computer readable storage medium of claim 20, wherein the set of instructions causes the system to: determine a wave marker indicating the location of an R-wave in the cardiac electrogram, and determine a window of the cardiac electrogram comprising the single QRS complex. 